package com.huirui.server.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 购物车表
 *
 * @TableName t_shipping_cart
 */
@TableName(value = "t_shipping_cart")
@Data
public class ShippingCart implements Serializable {
    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 购物车记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;
    /**
     * 商品id
     */
    @TableField(value = "product_id")
    private Long productId;
    /**
     * 规格ID
     */
    @TableField(value = "product_specification_id")
    private Long productSpecificationId;
    /**
     * 加入时的价格
     */
    @TableField(value = "price")
    private Double price;
    /**
     * 商品数量
     */
    @TableField(value = "quantity")
    private Integer quantity;
    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    private LocalDateTime createdTime;
    /**
     * 更新时间
     */
    @TableField(value = "updated_time")
    private LocalDateTime updatedTime;
}